function quickSort(arr){
	const len = arr.length
	if(len<=1){
		return arr
	}
	const pivot= arr[0]
	const left = []
	const right = []
	for(let i = 1;i<len;i++){
		if(arr[i]<arr[0]){
			left.push(arr[i])
		}else{
			right.push(arr[i])
		}
	}
	return [...quickSort(left),pivot,...quickSort(right)]
}
const arr = [9, 3, 10, 6, 2, 1, 5, 7, 8, 4];
const target = quickSort(arr)
console.log("🚀 ~ target:", target)
